<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        input {
            overflow: visible;
        }
    </style>
</head>
<body>
    <input type="text"><button>tijaio1</button>
    <script>
        var inp = document.querySelector("input");
        var btn = document.querySelector("button");
        inp.oninput = function (){
            console.log(inp.value);
        }
        console.log(inp);
        btn.onclick = function (){
           inp.autofocus = true ;
        }
    </script>
</body>
</html>